function getCookie(name) {
    document.cookie.match(new RegExp('(^| )' + name + '=([^;]*)'))
}